import { createStore,applyMiddleware,compose } from 'redux'
import thunk from 'redux-thunk'
import reducer from './rootReducer'
const enhancer = compose(
  applyMiddleware(thunk),
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
  )
const store = createStore(
  reducer,
  enhancer
  );
// reducer 要作为store的参数传入
export default store;